﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfCommGoodsLevelThree.aspx.cs" Inherits="msBsc.WebUi.wfCommGoodsLevelThree" %>

<!DOCTYPE HTML>
<html>
<head id="Head1" runat="server">
    <title>商家自定义导航分类</title> 
    <link rel="shortcut icon" href="/themes/Style1/Image/favicon.ico" type="image/x-icon" />
    <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jBPage.js,themes/Style1/jsQt.js,themes/Style1/jsDealer.js"
        type="text/javascript"></script>
    <!--head fix rgn-->
    <style type="text/css">
        body{ overflow:hidden; margin:0px; padding:0px;}
    </style>
    <script type="text/javascript">
        $(window).load(function () {
            $.ploadFile("Grid", function (script, textStatus) {
                initGrid1();
            });
            $.ploadFile("layer", function (script, textStatus) {
                //                layer.load('加载中'); 
            });
        });
        function initGrid1() {
            var colsOption = [
            { id: 'chk', isCheckColumn: true, filterable: false, exportable: false },
            { id: 'CT_LEVEL_THREE_ID', hidden: true, filterable: false, exportable: false },
//            { id: 'buynow2', header: "货物参数设置", width: 100, resizable: false, filterable: false, exportable: false, sortable: false, renderer: function (value, record, columnObj, grid, colNo, rowNo) {
//                return "<a  href=\"javascript:void(0);return false;\" onclick=\"javascript:viewItem('" + record.CT_LEVEL_THREE_ID + "');return false;\" target='_self'>编辑货物参数</a>";
//            }
//            },
            {id: 'CT_LEVEL_THREE_NME', header: "三级分类名称", width: 220, editor: { type: 'text'} }, 
            { id: 'INITIAL_DT', header: "添加日期", width: 150 },
            { id: 'INITIAL_USR', header: "添加人", width: 120 },
            { id: 'REC_UPDATE_DT', header: "更改日期", width: 150 },
            { id: 'REC_UPDATE_USR', header: "更改人", width: 120 }
            ];
            var gridOption1 = getGtOp('myGrid1', colsOption, 'gridbox1', 'CT_LEVEL_THREE_ID');
            gridOption1.height = "500px";
            gridOption1.autoLoad = true;
            gridOption1.autogtResize = false;
            var myGrid1 = new Sigma.Grid(gridOption1);
            myGrid1.render();
            myGrid1.readOnly = false;
            //            btnDo("btnEdit");
            //            autogtResize("bigbox2", myGrid1);
        };
        //        function ShowThreeLevelEdit(_sOneId, _sOneNme) {
        //            $.layer({
        //                type: 2,
        //                shade: [0.5, '#000'],
        //                fix: true,
        //                title: '编辑三级分类-' + _sOneNme,
        //                maxmin: true,
        //                iframe: { src: '/d_CommGoodsLevelThree.htm?ONE_ID=' + _sOneId },
        //                area: ['800px', '440px']
        //            });
        //        };

        function btnDo(sEbtn) {
            GtGrid1Action = sEbtn;
            var opart = GetGtParam("myGrid1");
            if (sEbtn == "btnSave") {
                doSaveGt('myGrid1');
            }
            else {
                ajaxComm(opart); //调用页面回调，并传入参数
            }
            GtGrid1Action = "";
        };
        function GetGtParam(jqGridID) {
            var _jsParam = new jsonRow();
            if (jqGridID == "myGrid1") {
                GetFormJson("divCondition", _jsParam);
                _jsParam.AddCell("gtGridID", "myGrid1");
                _jsParam.AddCell("TWO_ID", $("#txtOneId").val());
                _jsParam.AddCell("ACTION", GtGrid1Action);
                //这里可增加传入后台的参数
            } return _jsParam;
        };
    </script> 
</head>
<body>
            <div id="bigbox2" style="margin: 0px; margin-top: 0px;margin-left:-1px; margin-right:2px;">
                <div id="gridbox1" style="border: 0px solid #cccccc; background-color: #f3f3f3; padding: 5px;">
                </div>
            </div>
    <input value="" type="hidden" id="txtOneId"  name="txtOneId"/>
</body>
</html>
